package com.ds.smartstudio.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.Email;

/**
 * <p>
 *
 * </p>
 *
 * @author yangsf
 * @since 2022-07-02 10:42:24
 */
@Getter
@Setter
@TableName("ds_user")
@ApiModel(value = "User对象", description = "对应User表")
public class User {

    @ApiModelProperty("用户名  ")
    private String dsUserName;

    @ApiModelProperty("密码")
    @TableField("ds_user_password")
    @JSONField(serialize = false)
    private String dsUserPassword;

    @Email
    @ApiModelProperty("邮箱")
    @TableField("ds_user_email")
    private String dsUserEmail;

    @ApiModelProperty("手机")
    @TableField("ds_user_tel")
    private String dsUserTel;

    @ApiModelProperty("用户权限：如果为0则为普通用户，1则为管理员  ")
    @TableField("ds_user_role")
    private Integer dsUserRole;

    @ApiModelProperty("创建时间 ")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty("修改时间  ")
    @TableField(value = "modify_time", fill = FieldFill.INSERT_UPDATE)
    private Date modifyTime;


    @ApiModelProperty("id ，自增")
    @TableId(value = "ds_user_id", type = IdType.AUTO)
    private Integer dsUserId;

}
